package userInterface;

import java.awt.BorderLayout;
import java.awt.Color;

import javax.swing.*;
import system.GeneralSystem;

public class FunctionSetJPanel extends JPanel{
	private GeneralSystem system;
	private FinalDealJPanel dealJPanel;
	private SaleStragetyJPanel stragetyJPanel;
	
	public FunctionSetJPanel(GeneralSystem system) {
		this.system = system;
		this.setLayout( new BorderLayout() );
		
		dealJPanel = new FinalDealJPanel( system );
		this.add( BorderLayout.EAST, dealJPanel );
		
		stragetyJPanel = new SaleStragetyJPanel( system );
		this.add( BorderLayout.WEST, stragetyJPanel );
	}


	public void refreshTotalFee(Double totalFee) {
		dealJPanel.refreshTotalFee( totalFee );
	}


	public  void releaseOkPointJButton() {
		stragetyJPanel.releaseOkPointJButton();
		
	}


	public void refreshSupposedPay(Double totalFee) {
		dealJPanel.refreshSupposedPay(totalFee);
		
	}

}
